<?php
namespace Components\Products\First;

class Adapter {
	static private $instance = [];

	public function __construct($config = []) {
		
	}

	static public function getValidationInstance($parameter = []) {
		if(isset(self::$instance['validation']) && !empty(self::$instance['validation'])) {
			return self::$instance['validation'];
		}

		return self::$instance['validation'] = new Validation();
	}

	static public function getFilterInstance($parameter = []) {
		if(isset(self::$instance['filter']) && !empty(self::$instance['filter'])) {
			return self::$instance['filter'];
		}

		return self::$instance['filter'] = new Filter();
	}

	static public function getServiceInstance($parameter = []) {
		if(isset(self::$instance['service']) && !empty(self::$instance['service'])) {
			return self::$instance['service'];
		}

		return self::$instance['service'] = new Service($parameter);
	}
}
